From videos recorded from a drone flying over wheat plot, motion in the plot was quantified by calculating the difference between frames.
Step 1: Stabilization
I used the stabilization pluging from Sony Vegas 21 to stabilize each video using the options as follow. The Frame was adjusted to contain the plot, and after the stabilization was done, additional rotation was applied to make sure the plot was levelled on the footage.
Step 2: Frame-splitting
After stabilization was done, the video was rendered was a collection of frame, in the .png format, at the original resolution. Other methods of splitting frames either after rendering the stabilized video, or using a smaller picture format introduced compression artefacts and so were rejected. Below is an example of rendering the a video with the same exact settings. Artefacts appear in white.
Step 3: Calculating the frame difference
Finally, each frame was imported in R, and the absolute difference between frame in pixel value for each channel (red, green, blue) was calculated. I used the absolute difference because motion by leaves is as much the result of leaves moving away from a pixel, as it is from leaves moving into a pixel (although both are saved independently in an excel file). The value calculated for each channel is bounded between 0 and 1. 0 means absolutely no difference between frame, 1 means absolute difference (e.g. from pure black to pure white). This makes comparison between videos easier, as the value is normalized by default.
Here is an example for the frame difference over the actual video. The video is darkened to see motion better, and positive and negative differences (averaged for the 3 color channels) are shown respectively in red and green: